import { lazy } from "react";
import { createBrowserRouter, Navigate } from "react-router-dom";

let Home = lazy(() => import("../pages/home/Index"));
let List = lazy(() => import("../pages/list/Index"));
let Xq = lazy(() => import("../pages/xq/index"));
let Login = lazy(() => import("../pages/login/Index"));
let Chat = lazy(() => import("../pages/chat/Index"));

let routes = createBrowserRouter([
  {
    path: "/",
    element: <Navigate to={"/home"}></Navigate>,
  },
  {
    path: "/home",
    element: <Home></Home>,
  },
  {
    path: "/list",
    element: <List></List>,
  },
 {
    path: "/xq",
    element: <Xq></Xq>,
  },
 {
    path: "/chat",
    element: <Chat></Chat>,
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
]);
export default routes;
